--*-----------------------------------------------------------------------------
--
-- SITE_OPTION
--
--*-----------------------------------------------------------------------------
IF NOT EXISTS(
  SELECT 1
    FROM information_schema.tables
   WHERE table_name = 'SITE_OPTION'
)
BEGIN
  CREATE TABLE SITE_OPTION
  (
      ID INT IDENTITY(1,1) NOT NULL
    , NAME VARCHAR(50) NOT NULL
    , VALUE_INT   INT
    , VALUE_DATE  DATETIME
    , VALUE_TEXT  NVARCHAR(MAX)
  )
  ALTER TABLE SITE_OPTION ADD CONSTRAINT PK_SITE_OPTION PRIMARY KEY CLUSTERED(ID ASC)
END
GO
--*-----------------------------------------------------------------------------
INSERT INTO SITE_OPTION(NAME)
       SELECT 'MAIN_PAGE'
 UNION SELECT 'SMTP_SERVER'
 UNION SELECT 'SMTP_USER_NAME'
 UNION SELECT 'SMTP_PASSWORD'
 UNION SELECT 'SMTP_PORT'
 UNION SELECT 'ADMIN_USER_NAME'
 UNION SELECT 'ADMIN_PASSWORD'
 UNION SELECT 'ADMIN_EMAIL'
 UNION SELECT 'DISQUS_DOMAIN'
 UNION SELECT 'ADD_THIS_URL'
 UNION SELECT 'CONTACT_PHONE1'
 UNION SELECT 'CONTACT_NAME1'
 UNION SELECT 'CONTACT_PHONE2'
 UNION SELECT 'CONTACT_NAME2'
 UNION SELECT 'CONTACT_PHONE3'
 UNION SELECT 'CONTACT_NAME3'
 UNION SELECT 'AUTHOR'
 UNION SELECT 'META_KEYWORDS'
 UNION SELECT 'META_DESCRIPTION'
 GO
 